import Taro, { Component } from '@tarojs/taro'
import {View } from '@tarojs/components'

import './main-menu.scss'
import ICON1 from './../../images/ICON1.png'
import ICON2 from './../../images/ICON2.png'
import ICON3 from './../../images/ICON3.png'
import ICON4 from './../../images/ICON4.png'
import ICON5 from './../../images/ICON5.png'
import ICON6 from './../../images/ICON6.png'
import ICON7 from './../../images/ICON7.png'
import ICON8 from './../../images/ICON8.png'

export class MainMenu extends Component {
  

  menuClick(url, e){
      Taro.navigateTo({
      url: url
    })
  }

render() {
    return (
<View>
<View className="butt" onClick={this.menuClick.bind(this,'/pages/detail/index?menu_id=1')}>
  <View className="button_image"><Image src={ICON1} mode="widthFix" /></View>
  <View className="button_title">保洁服务</View>
</View>
<View className="butt" onClick={this.menuClick.bind(this,'/pages/detail/index?menu_id=2')}>
  <View className="button_image"><Image src={ICON2} mode="widthFix" /></View>
  <View className="button_title">玻璃清洁</View>
</View>
<View className="butt" onClick={this.menuClick.bind(this,'/pages/detail/index?menu_id=3')}>
  <View className="button_image"><Image src={ICON3} mode="widthFix" /></View>
  <View className="button_title">空房开荒</View>
</View>
<View className="butt" onClick={this.menuClick.bind(this,'/pages/detail/index?menu_id=4')}>
  <View className="button_image"><Image src={ICON4} mode="widthFix" /></View>
  <View className="button_title">疏通下水道</View>
</View>
<View className="butt" onClick={this.menuClick.bind(this,'/pages/detail/index?menu_id=5')}>
  <View className="button_image"><Image src={ICON5} mode="widthFix" /></View>
  <View className="button_title">油烟机清洁</View>
</View>
<View className="butt" onClick={this.menuClick.bind(this,'/pages/detail/index?menu_id=6')}>
  <View className="button_image"><Image src={ICON6} mode="widthFix" /></View>
  <View className="button_title">冰箱清洁</View>
</View>
<View className="butt" onClick={this.menuClick.bind(this,'/pages/detail/index?menu_id=7')}>
  <View className="button_image"><Image src={ICON7} mode="widthFix" /></View>
  <View className="button_title">电脑维修</View>
</View>
<View className="butt" onClick={this.menuClick.bind(this,'/pages/detail/index?menu_id=8')}>
  <View className="button_image"><Image src={ICON8} mode="widthFix" /></View>
  <View className="button_title">同城配送</View>
</View>
</View>
    )
  }
}